package com.jastar.android.game.richman.logic.card;

import com.jastar.android.game.richman.GameActivity;
import com.jastar.android.game.richman.logic.bean.Cell;
import com.jastar.android.game.richman.logic.bean.Player;
import com.jastar.android.game.richman.logic.handler.BaseCallback;
import com.jastar.android.util.Alert;

public class EarthquakeCard extends Card {

    private int num;

    public EarthquakeCard(String message, int weight, int price, int num) {
        super(message, weight, price);
        this.num = num;
    }

    public void use(GameActivity activity, Cell cell, Player player, BaseCallback callback) {
        int res = Cell.randomDestroy(num);
        Alert.toast(activity, "有" + res + "处房产被摧毁!");
        callback.onResult();
    }

}
